package com.planegame.Obj;

import com.planegame.GameWin;

import java.awt.*;

//boss发射的子弹
public class EnemyShellObj extends GameObject{
    @Override
    public void setImg(Image img) {
        super.setImg(img);
    }

    @Override
    public void setX(int x) {
        super.setX(x);
    }

    @Override
    public void setY(int y) {
        super.setY(y);
    }

    @Override
    public void setWidth(int width) {
        super.setWidth(width);
    }

    @Override
    public void setHight(int hight) {
        super.setHight(hight);
    }

    @Override
    public void setSpeed(double speed) {
        super.setSpeed(speed);
    }

    @Override
    public void setFrame(GameWin frame) {
        super.setFrame(frame);
    }

    @Override
    public Image getImg() {
        return super.getImg();
    }

    @Override
    public int getX() {
        return super.getX();
    }

    @Override
    public int getY() {
        return super.getY();
    }

    @Override
    public int getWidth() {
        return super.getWidth();
    }

    @Override
    public int getHight() {
        return super.getHight();
    }

    @Override
    public double getSpeed() {
        return super.getSpeed();
    }

    public EnemyShellObj() {
        super();
    }

    public EnemyShellObj(Image img, int x, int y, double speed) {
        super(img, x, y, speed);
    }

    public EnemyShellObj(int x, int y, int width, int hight) {
        super(x, y, width, hight);
    }

    public EnemyShellObj(Image img, int x, int y, int width, int hight, double speed, GameWin frame) {
        super(img, x, y, width, hight, speed, frame);
    }

    @Override
    public void paintSelf(Graphics gImage) {
        super.paintSelf(gImage);
        y+=speed;
        if (this.getRec().intersects(this.frame.planeObj.getRec())) {//注意这个this.frame，很搞
            GameWin.state=3;
        }
    }

    @Override
    public Rectangle getRec() {
        return super.getRec();
    }
}
